import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.demo.service.AccountService;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * 整合Junit
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class TestApp {
	
	@Autowired
	private AccountService accountService;
	@Test
	public void demo01(){
		//String xmlPath = "applicationContext.xml";
		//ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);
		//AccountService accountService =  (AccountService) applicationContext.getBean("accountService");
		accountService.transfer("bbb", "aaa", 400);
	}

}
